3 variable system of equations